<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>UPMS</title>
<%@ include file="/common/meta.jsp"%>
<link href="${ctx}/js/validate/jquery.validate.css" type="text/css"
	rel="stylesheet" />
<link href="${ctx}/css/style.css" type="text/css" rel="stylesheet" />
<style type="text/css">
.tdLabel {text-align:right;} 
</style>
<script language=JavaScript1.2
	src="${ctx}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script src="${ctx}/js/validate/jquery.validate.js"
	type="text/javascript"></script>
<script src="${ctx}/js/validate/messages_cn.js" type="text/javascript"></script>
<script>
		$(document).ready(function() {
			//聚焦第一个输入框
			$("#priority").focus();
			//为inputForm注册validate函数
			$("#inputPage").validate({
				rules: {
					term: "assignee",
					shortcutKey: "completion"
				}
			});
		});
	</script>
</head>
<body>
	<div style="font-family:Arial;font-size:15px;font-weight:bold;font-style:normal;align:middle">
		<s:if  test="id!=null">UPMS - Page Detail</s:if> 
		<s:if  test="id==null">UPMS - Add New Page</s:if>
	</div>
	<form id="inputPage" action="page!save.action" method="post">
		<div id="message">
			<s:actionmessage theme="mytheme" cssClass="error" />
		</div>
		<input type="hidden" name="id" value="${id}" />
		<div id="content">
				<table width="99.5%" class="main-content" id="apage">
				<tr>
					<td align="right">Page ID:</td>
					<td><input type="text" name="pageId" size="10" id="pageId"
						value="${pageId}" /></td>
					<td align="right">Page Name:</td>
					<td><input type="text" name="pageName" size="40" id="pageName"
						value="${pageName}" /></td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td align="right">Priority:</td>
					<td><input type="text" name="priority" size="2" id="priority"
						value="${priority}" /></td>
					<td align="right">Assigned To:</td>
					<td><input type="text" name="assignee" size="40" id="assignee"
						value="${assignee}" /></td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td align="right">Team:</td>
					<td><input type="text" name="team" size="6" id="team"
						value="${team}" /></td>
					<td align="right">Walkthrough Assigned to:</td>
					<td><input type="text" name="walkthroughAssignee" size="40"
						id="walkthroughAssignee" value="${walkthroughAssignee}" /></td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td align="right">Status:</td>
					<td><s:select name="status" label="Status" theme="simple"
							list="#{'':'', 'Assigned':'Assigned',
							        'Not Started':'Not Started',
							        'Started':'Started',
							        'Started with Issue':'Started w/ Issue',
							        'WalkThru':'Walk through',
							        'WT with Issue':'Walk through w/ Issue',
							        'UnitTest':'Unit Test',
							        'Completed':'Completed',
							        'No Conversion':'No Conversion'}"
							id="key" listValue="value" headerKey="%{status}" /></td>
					<td align="right">Issues:</td>
					<td colspan="5"><input type="text" name="issues" size="40"
						id="issues" maxlength="100" value="${issues}" /></td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td align="right">Expected Completion:</td>
					<td><input type="text" name="expectedCompletionDate" size="12"
						id="expectedCompletionDate"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'%y-%M-%d'})"
						readonly="readonly" maxlength="12"
						value="${expectedCompletionDate}" /></td>
					<td colspan="3">&nbsp;</td>
				</tr>
				<tr>
					<td align="right">Reviewer:</td>
					<td><s:select name="reviewer" label="Reviewer" theme="simple" 
							list="#{'':'', 'utreview':'Unit Test Reveiw',
					 'assignee':'Assigned To', 'wkthru':'Walkthrough'}"
							id="key" listValue="value" headerKey="%{reviewer}" /></td>
					<td align="right">Unit Test Plan:</td>
					<td><input name="unitTestPlan" id="unitTestPlan" type="file" />
					</td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td align="right">Test Plan Approved?</td>
					<td><s:select name="testPlanApprovedFlag" theme="simple"
							list="#{'':'','Y':'Yes','N':'No'}" id="key" listValue="value"
							headerKey="%{testPlanApprovedFlag}" /></td>
					<td align="right">Walkthrough Checklist:</td>
					<td><input name="walkthroughChecklist"
						id="walkthroughChecklist" type="file" /></td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td align="right">Completion %:</td>
					<td><input type="text" name="completion" size="3"
						id="completion" maxlength="3" value="${completion}" /></td>
					<td align="right">Unit Test Artifacts:</td>
					<td><input name="unitTestArtifacts" id="unitTestArtifacts"
						type="file" /></td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" align="right">Notes:</td>
					<td colspan="4"><s:textarea name="notes" id="notes" cols="80" colspan="4" theme="simple"
							rows="5">
					</s:textarea></td>
				</tr>
				<tr>
					<td >&nbsp;</td>
					<td >&nbsp;</td>
					<td >&nbsp;</td>
				   	<td colspan="4" valign="middle" height="40px">
				  		<s:submit type="button" theme="simple" value="Save"></s:submit>&nbsp;
				   		<s:reset type="button" theme="simple" onclick="history.back()" value = "Cancel"></s:reset>
				   	</td>
				   	<td >&nbsp;</td>
				</tr>				
			</table>
		</div>
	</form>
</body>
</html>